/**
 * 用户相关接口
 */
import request from '@/utils/request'

// 获取用户列表
export const getUserList = (params) => {
  return request.get('/admin/getUserList',{params})
}

/**
 * 创建用户
 * @param {Object} data 登录参数
 * @returns {Promise}
 */
export const addUser = (data) => {
  return request.put('/admin/addUser', data)
}

// 更新用户 
export const updateUser = (data) => {
  return request.put(`/admin/updateUser`, data)
}

// 删除用户
export const deleteUser = (id) => {
  return request.delete(`/admin/deleteUser`, {data: {id}})
}

// 重置密码
export const resetPassword = (data) => {
  return request.put('/admin/updatePassword',data)
} 